package cn.mazexal.exambg.models.enums;

import lombok.Getter;

@Getter
public enum FileFrom {

    EXAM(1, "examBg");

    private Integer code;

    private String prev;

    public static FileFrom getByCode(Integer code) {
        for (FileFrom value : FileFrom.values()) {
            if (value.code.equals(code)) {
                return value;
            }
        }
        return null;
    }

    FileFrom(Integer code, String prev) {
        this.code = code;
        this.prev = prev;
    }

}
